package tickTackToe;

public class RandomStrategy extends Strategy {
	private char _row;
	private int _col;

	@Override
	void makeMove() {

		boolean flag = true;
		while (flag) {
			_row = randomChar();
			_col = randomInt();

			flag = Game.getCurField().isReserved(_row, _col);
			Game.makeMove('o', _row, _col);
		}
		System.out.println("Der Computer setzt auf " + _row + _col);
		flag = true;

	}

	private int randomInt() {
		return (int) (Math.random() * 3) + 1;
	}

	// random zwischen a und c
	private char randomChar() {
		return (char) (Math.random() * (100 - 97) + 97);
	}

	@Override
	Field getMove() {
		// TODO Auto-generated method stub
		return null;
	}
}
